Plugins In Cobian Backup 6 it is now possible to create/use plugins to enhance the programs functions. Seven types of plugins are available: Restoring plugins: Are executed and used only from the user interface. Their function is to restore the selected backup. If such a plugin is installed, right-clicking on a backup on the history will bring back the Restore menu. Decrypting plugins: Are executed and used only from the user interface. Their function is to decrypt files or directories that where encrypted by Cobian Backup 6. The standard installation already provides one decrypting plugin. Before backup plugin: This plugin is executed by the engine when the backup of a task begins. It can be used to enhance the Before backup event. After backup plugin: This plugin is executed by the engine when the backup of a task ends. It can be used to enhance the After backup event. After zip plugin: This plugin is executed by the engine when a zipping operation ends. It can be used to manipulate the resulting zip files. Every hour plugin: This plugin is executed by the engine, every hour. It will be executed for example at 1:00, 2:00, 3:00, etc. Registry plugin: This plugin is executed by the user interface and can be used to backup your registry. The plugins can be configured on the Option dialog box.
For the developer If you want to create a plugin you need to create a dll with 2 exported functions. See the description of every plugin. Restoring plugin: Exported functions : (obligatory) *** function MainEntry(const pBUString,pLanguageStr:PChar; bShowErrorsOnly, bReserved:boolean; iReserved:integer;cParentHandle:cardinal):integer;stdcall;
Where pBUStrings is the backup string with the info to restore. This is a comma separated string with all the information about the backup. pLanguage is the Path and the language to the active language. This parameter can be ignored. bShowErrorsOnly: is true if the application is ONLY logging errors. Can be ignored. bReserved, iReserved: not used at this moment cParentHandle: the handle of the UserInterface.
Returns the number of errors or 0 if OK. **** **** Decrypting plugin: Exported functions : (obligatory) **** function MainEntry(const pAppPath, pLanguageFiles:PChar; bShowErrorsOnly,bReserved:boolean; iReserved:integer; cParentHandle:cardinal):integer;stdcall;
Where pAppPath: is the Path to the user interface, can be ignored pLanguageFiles is the Path and the language to the active language. This parameter can be ignored. bShowErrorsOnly: is true if the application is ONLY logging errors. Can be ignored. bReserved, iReserved: not used at this moment cParentHandle: the handle of the UserInterface. Returns the number of errors or 0 if OK. **** function PluginID():integer;stdcall;The identification of the plugin. Must return 2. ****
Registry plugin Exported functions : (obligatory) **** function MainEntry(const pAppPath, pLanguageFiles:PChar; bShowErrorsOnly,bReserved:boolean; iReserved:integer; cParentHandle:cardinal):integer;stdcall;
Where pAppPath: is the Path to the user interface, can be ignored pLanguageFiles is the Path and the language to the active language. This parameter can be ignored. bShowErrorsOnly: is true if the application is ONLY logging errors. Can be ignored. bReserved, iReserved: not used at this moment cParentHandle: the handle of the UserInterface. Returns the number of errors or 0 if OK. **** function PluginID():integer;stdcall; The identification of the plugin. Must return 7. **** Before backup plugin Exported functions : (obligatory) **** function MainEntry(const pSource,pDestination,pBUString,pAppPath:PChar):integer;stdcall; Where PSource: the source as a comma separated string PDestination: The destination directories as a comma separated string pBUString: the whole task information as a comma separated string pAppPath: the path to the engine Returns the number of errors or 0 if OK. To cancel the backup, return -1. **** **** After backup plugin Exported functions : (obligatory) **** function MainEntry(const pSource,pDestination,pBUString,pAppPath:PChar):integer;stdcall; Where PSource: the source as a comma separated string PDestination: The destination directories as a comma separated string pBUString: the whole task information as a comma separated string pAppPath: the path to the engine Returns the number of errors or 0 if OK. To cancel the backup, return -1. **** **** After zip plugin Exported functions : (obligatory) **** function MainEntry(const pZipNames,pAppPath:PChar):integer;stdcall; Where PZipNames: the resulting zips as a comma separated string pAppPath: the path to the engine Returns the number of errors or 0 if OK. To cancel the backup, return -1. **** **** Every hour plugin Exported functions : (obligatory) **** function MainEntry(const Hours,Minutes:word):integer;stdcall; Where Hours, Minutes: the time where the plugin executed. This plugin blocks the scheduler, so try to exit this procedure AS SOON AS POSSIBLE or start another process asynchronously. Returns the number of errors or 0 if OK. **** **** |
⌐2000-2004 by Luis Cobian |